SlideShare a Scribd company logo
Fast and Easy XHTML - XHTML Tutorial, By Shirley E. Kaiser, M.A., SKDesigns - Website Tips at Websitetips.com




 December, 2001, Updated March 2006

 Copyright © 2001-2006, Shirley E. Kaiser, M.A., SKDesigns. All rights reserved.




 Wondering how to turn your HTML markup into XHTML? Here are a few quick tips to

 teach you the very basics, a sample XHTML document, and resources for more

 information.


 If you already know HTML, I suspect you can learn how to implement these markup

 changes within a couple of hours. If you just dig in and give it a try, I think you'll be

 pleasantly surprised to see that it's easier than you may have thought.


 Ready to give it a try? Let's go....



 The Basics
http://websitetips.com/articles/xhtml/basics/ (1 of 6)3/20/2006 11:32:47 AM
Fast and Easy XHTML, XHTML Tutorial, HTML, Web Standards, by Shirley ...ML Tutorials, CSS Tutorials and Tips, Website Tips at Websitetips.com




           1. All your markup needs to be in lowercase. For example, instead of <P></P>

                 it needs to be <p></p> for XHTML.

           2. Every tag must have a corresponding ending tag, such as <p></p> and

                 <li></li>. Some tags don't have a corresponding ending tag, such as <br>,

                 <hr>, and others. Those tags, to be backward compatible will look like this

                 instead:


                 <br />

                 <hr />


                 (Below is an XHTML document sample that shows more of these.)

           3. Every attribute value must be in double quotes, such as:

                 <img src="image.gif" height="150" width="40" alt="funny face" />


                 Notice that since the <img> tag doesn't have a corresponding ending tag that

                 it also is closed with the extra space and slash, too.

           4. Nesting must be correct (and symmetrical). HTML also requires correct

                 nesting, but it wasn't always as problematic in browsers. XHTML requires it

                 done properly, though. For example, this is incorrect:

                 <p><strong>Text</p></strong>


                 This is correct:

                 <p><strong>Text</strong></p>

           5. An ampersand (&) within an attribute value must use its character entity

                 reference. For example, a URL like this:


                 <a href="http://www.foo.com/cgi-bin/

http://websitetips.com/articles/xhtml/basics/ (2 of 6)3/20/2006 11:32:47 AM
Fast and Easy XHTML, XHTML Tutorial, HTML, Web Standards, by Shirley ...ML Tutorials, CSS Tutorials and Tips, Website Tips at Websitetips.com



                 class.pl?saturday&night&live">foo</a>


                 must instead be:


                 <a href="http://www.foo.com/cgi-bin/

                 class.pl?saturday&amp;night&amp;live">foo</a>

           6. Your markup must be well-formed. If you've already been writing good

                 markup that validates with W3C, it's no big deal. If not, it's a good time to

                 clean up your markup.



 A New DTD

 In addition to the above is a new DTD, too. The sample below is for XHTML 1.0

 transitional.




            <?xml version="1.0" encoding="UTF-8"?>

            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

            "http://www.w3.org/TR/xhtml1/DTD/

            xhtml1-transitional.dtd">

            <html xmlns="http://www.w3.org/1999/xhtml">



 The first line, beginning with <?xml version= ..., is the xml prolog, and it's

 recommended but not required. Note that using the xml prolog will trigger IE6 Quirks

 Mode, so you might want to leave it out or learn more about it before deciding. The



http://websitetips.com/articles/xhtml/basics/ (3 of 6)3/20/2006 11:32:47 AM
Fast and Easy XHTML, XHTML Tutorial, HTML, Web Standards, by Shirley ...ML Tutorials, CSS Tutorials and Tips, Website Tips at Websitetips.com
 xml prolog tells the browser that your document is based upon a DTD using XML, and

 that it's using a standard character encoding.


 The second line, beginning with <!DOCTYPE ....>, will look more familiar to you, this

 time representing XHTML 1.0 transitional.


 Then, the last line beginning with <html xmlns=" ....> replaces the <html>

 element, telling the browser the language and the namespace.


 Below is a sample XHTML document. Note that all the markup is in lowercase, there

 are quotes around the attribute values, the new endings for the tags that don't have

 corresponding ending tags, and it is all well formed.



 A Sample XHTML Document


            <?xml version="1.0" encoding="UTF-8"?>
            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

            <html xmlns="http://www.w3.org/1999/xhtml">
            <head>
            <title>Nifty New XHTML document</title>

            <meta name="description" content="This is the coolest XHTML document
            on the Internet." />

            <link rel="stylesheet" type="text/css" href="stylesheet.css" />

            </head>

            <body>

            <p>Content here.</p>
            <p>Content here.</p>



http://websitetips.com/articles/xhtml/basics/ (4 of 6)3/20/2006 11:32:47 AM
Fast and Easy XHTML, XHTML Tutorial, HTML, Web Standards, by Shirley ...ML Tutorials, CSS Tutorials and Tips, Website Tips at Websitetips.com

            <ol>
               <li>List item one</li>
               <li>List item two</li>
            </ol>


            <dl>
               <dt>Term</dt>
               <dd>definition</dd>
            </dl>


            <img src="image.gif" height="150" width="40" alt="funny face" />

            <br/>

            <table class="data">
            <tr><td>Green eggs</td><td>Ham</td></tr>
            </table>



            <form method="get" action="foo">

            <select name="">
            <option value="all">All Products</option>
            <option value="books">Books</option>
            </select>

            <input type="text" name="keyword" size="10"
            value="" />

            <input type="submit" name="Search" value="Go!" />

            </form>


            </body>
            </html>




 Resources




http://websitetips.com/articles/xhtml/basics/ (5 of 6)3/20/2006 11:32:47 AM
Fast and Easy XHTML, XHTML Tutorial, HTML, Web Standards, by Shirley ...ML Tutorials, CSS Tutorials and Tips, Website Tips at Websitetips.com




                                        To learn lots more about XHTML, check out WebsiteTips.com's
 XHTML section for annotated links to W3C recommendations, articles and tips, sites

 devoted to XHTML, and more.


 Also highly recommended is Molly Holzschlag's book, XML, HTML, XHTML Magic

 published by New Riders.



         This tutorial was originally published December 09, 2001 at Brainstorms and Raves.



         Copyright © 2001 Shirley E. Kaiser, M.A. All Rights Reserved. Reprint with permission only.

         Please contact the author for details.




                                               Today is March 20, 2006 - PST
                                Copyright © 1996-2006 WebsiteTips.com. All rights reserved.
                                           Created and maintained by SKDesigns.


                                      http://websitetips.com/articles/xhtml/basics/
                                      Last modified March 20, 2006 - 7:16pm PST




http://websitetips.com/articles/xhtml/basics/ (6 of 6)3/20/2006 11:32:47 AM

More Related Content

What's hot

Modular HTML, CSS, & JS Workshop
Modular HTML, CSS, & JS WorkshopModular HTML, CSS, & JS Workshop
Modular HTML, CSS, & JS Workshop
Shay Howe
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
danpaquette
 
A Primer on HTML 5 - By Nick Armstrong
A Primer on HTML 5 - By Nick ArmstrongA Primer on HTML 5 - By Nick Armstrong
A Primer on HTML 5 - By Nick Armstrong
Nick Armstrong
 
Findability Bliss Through Web Standards
Findability Bliss Through Web StandardsFindability Bliss Through Web Standards
Findability Bliss Through Web Standards
Aarron Walter
 
Slow kinda sucks
Slow kinda sucksSlow kinda sucks
Slow kinda sucks
Tim Wright
 
An Intro to HTML & CSS
An Intro to HTML & CSSAn Intro to HTML & CSS
An Intro to HTML & CSS
Shay Howe
 
HTML und CSS für Designer / HTML & CSS for designers (PUBKON 2014)
HTML und CSS für Designer / HTML & CSS for designers (PUBKON 2014)HTML und CSS für Designer / HTML & CSS for designers (PUBKON 2014)
HTML und CSS für Designer / HTML & CSS for designers (PUBKON 2014)
Michaela Lehr
 
[Access U 2010] HTML5 & Accessibility
[Access U 2010] HTML5 & Accessibility[Access U 2010] HTML5 & Accessibility
[Access U 2010] HTML5 & AccessibilityChristopher Schmitt
 
Html basics-auro skills
Html basics-auro skillsHtml basics-auro skills
Html basics-auro skills
BoneyGawande
 
Intro to HTML 5 / CSS 3
Intro to HTML 5 / CSS 3Intro to HTML 5 / CSS 3
Intro to HTML 5 / CSS 3
Tadpole Collective
 
HTML5 Essentials
HTML5 EssentialsHTML5 Essentials
HTML5 Essentials
Marc Grabanski
 
Boostrap basics
Boostrap basicsBoostrap basics
Boostrap basics
JTechTown
 
Basic HTML
Basic HTMLBasic HTML
Basic HTML
sunmitraeducation
 
Front End Best Practices
Front End Best PracticesFront End Best Practices
Front End Best Practices
Holger Bartel
 
Html - By Auroskkil
Html - By AuroskkilHtml - By Auroskkil
Html - By Auroskkil
BoneyGawande
 
Twitter bootstrap training_session_ppt
Twitter bootstrap training_session_pptTwitter bootstrap training_session_ppt
Twitter bootstrap training_session_ppt
Radheshyam Kori
 
CSS Best practice
CSS Best practiceCSS Best practice
CSS Best practice
Russ Weakley
 

What's hot (19)

Modular HTML, CSS, & JS Workshop
Modular HTML, CSS, & JS WorkshopModular HTML, CSS, & JS Workshop
Modular HTML, CSS, & JS Workshop
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
A Primer on HTML 5 - By Nick Armstrong
A Primer on HTML 5 - By Nick ArmstrongA Primer on HTML 5 - By Nick Armstrong
A Primer on HTML 5 - By Nick Armstrong
 
Findability Bliss Through Web Standards
Findability Bliss Through Web StandardsFindability Bliss Through Web Standards
Findability Bliss Through Web Standards
 
Slow kinda sucks
Slow kinda sucksSlow kinda sucks
Slow kinda sucks
 
An Intro to HTML & CSS
An Intro to HTML & CSSAn Intro to HTML & CSS
An Intro to HTML & CSS
 
HTML und CSS für Designer / HTML & CSS for designers (PUBKON 2014)
HTML und CSS für Designer / HTML & CSS for designers (PUBKON 2014)HTML und CSS für Designer / HTML & CSS for designers (PUBKON 2014)
HTML und CSS für Designer / HTML & CSS for designers (PUBKON 2014)
 
[Access U 2010] HTML5 & Accessibility
[Access U 2010] HTML5 & Accessibility[Access U 2010] HTML5 & Accessibility
[Access U 2010] HTML5 & Accessibility
 
HTML & XHTML Basics
HTML & XHTML BasicsHTML & XHTML Basics
HTML & XHTML Basics
 
Html basics-auro skills
Html basics-auro skillsHtml basics-auro skills
Html basics-auro skills
 
Intro to HTML 5 / CSS 3
Intro to HTML 5 / CSS 3Intro to HTML 5 / CSS 3
Intro to HTML 5 / CSS 3
 
CSS Refresher
CSS RefresherCSS Refresher
CSS Refresher
 
HTML5 Essentials
HTML5 EssentialsHTML5 Essentials
HTML5 Essentials
 
Boostrap basics
Boostrap basicsBoostrap basics
Boostrap basics
 
Basic HTML
Basic HTMLBasic HTML
Basic HTML
 
Front End Best Practices
Front End Best PracticesFront End Best Practices
Front End Best Practices
 
Html - By Auroskkil
Html - By AuroskkilHtml - By Auroskkil
Html - By Auroskkil
 
Twitter bootstrap training_session_ppt
Twitter bootstrap training_session_pptTwitter bootstrap training_session_ppt
Twitter bootstrap training_session_ppt
 
CSS Best practice
CSS Best practiceCSS Best practice
CSS Best practice
 

Viewers also liked

Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascripttutorialsruby
 
Ruby
RubyRuby
Ruby
besen
 
Ruby quick ref
Ruby quick refRuby quick ref
Ruby quick ref
Tharcius Silva
 
Ruby Essentials
Ruby EssentialsRuby Essentials
Ruby Essentials
Arulalan T
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />tutorialsruby
 
Ruby :: Training 1
Ruby :: Training 1Ruby :: Training 1
Ruby :: Training 1Pavel Tyk
 
Ruby 1.9.3 Basic Introduction
Ruby 1.9.3 Basic IntroductionRuby 1.9.3 Basic Introduction
Ruby 1.9.3 Basic IntroductionPrabu D
 
Ruby basic3
Ruby basic3Ruby basic3
Ruby basic3
Ho Yin Liu
 
Ruby basic2
Ruby basic2Ruby basic2
Ruby basic2
Ho Yin Liu
 
Ruby
RubyRuby
Ruby
ThirdWay
 
Ruby basic
Ruby basicRuby basic
Ruby basic
Ho Yin Liu
 
Ruby
RubyRuby
Confident Ruby: Be A Coding Hemingway
Confident Ruby: Be A Coding HemingwayConfident Ruby: Be A Coding Hemingway
Confident Ruby: Be A Coding Hemingway
Matthew Salerno
 
Object-Oriented Programming & Ruby
Object-Oriented Programming & RubyObject-Oriented Programming & Ruby
Object-Oriented Programming & Ruby
Amine Sadry
 

Viewers also liked (20)

LittleBookOfRuby
LittleBookOfRubyLittleBookOfRuby
LittleBookOfRuby
 
00 ruby tutorial
00 ruby tutorial00 ruby tutorial
00 ruby tutorial
 
Ruby1_full
Ruby1_fullRuby1_full
Ruby1_full
 
Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascript
 
Ruby
RubyRuby
Ruby
 
Ruby quick ref
Ruby quick refRuby quick ref
Ruby quick ref
 
Book of ruby
Book of rubyBook of ruby
Book of ruby
 
eng2u3less38
eng2u3less38eng2u3less38
eng2u3less38
 
Ruby Essentials
Ruby EssentialsRuby Essentials
Ruby Essentials
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
 
Ruby :: Training 1
Ruby :: Training 1Ruby :: Training 1
Ruby :: Training 1
 
Ruby 1.9.3 Basic Introduction
Ruby 1.9.3 Basic IntroductionRuby 1.9.3 Basic Introduction
Ruby 1.9.3 Basic Introduction
 
Ruby basic3
Ruby basic3Ruby basic3
Ruby basic3
 
Ruby cheat sheet
Ruby cheat sheetRuby cheat sheet
Ruby cheat sheet
 
Ruby basic2
Ruby basic2Ruby basic2
Ruby basic2
 
Ruby
RubyRuby
Ruby
 
Ruby basic
Ruby basicRuby basic
Ruby basic
 
Ruby
RubyRuby
Ruby
 
Confident Ruby: Be A Coding Hemingway
Confident Ruby: Be A Coding HemingwayConfident Ruby: Be A Coding Hemingway
Confident Ruby: Be A Coding Hemingway
 
Object-Oriented Programming & Ruby
Object-Oriented Programming & RubyObject-Oriented Programming & Ruby
Object-Oriented Programming & Ruby
 

Similar to xhtml_basics

Introduction to whats new in css3
Introduction to whats new in css3Introduction to whats new in css3
Introduction to whats new in css3
Usman Mehmood
 
More On Html 5
More On Html 5More On Html 5
More On Html 5
Darren Wood
 
Eye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easilyEye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easily
shabab shihan
 
Web technologies: Lesson 2
Web technologies: Lesson 2Web technologies: Lesson 2
Web technologies: Lesson 2
nhepner
 
Html beginners tutorial
Html beginners tutorialHtml beginners tutorial
Html beginners tutorial
nikhilsh66131
 
Html Workshop
Html WorkshopHtml Workshop
Html Workshop
vardanyan99
 
Html beginner
Html beginnerHtml beginner
Html beginnerwihrbt
 
WDIM268 Week 6 (Summer 2010)
WDIM268 Week 6 (Summer 2010)WDIM268 Week 6 (Summer 2010)
WDIM268 Week 6 (Summer 2010)Tyler Sticka
 
2001: Bridging the Gap between RSS and Java Old School Style
2001: Bridging the Gap between RSS and Java Old School Style2001: Bridging the Gap between RSS and Java Old School Style
2001: Bridging the Gap between RSS and Java Old School Style
Russell Castagnaro
 
HTML practical file
HTML practical fileHTML practical file
HTML practical file
Kuldeep Sharma
 
HTML Foundations, part 1
HTML Foundations, part 1HTML Foundations, part 1
HTML Foundations, part 1
Shawn Calvert
 
Sitepoint.com a basic-html5_template
Sitepoint.com a basic-html5_templateSitepoint.com a basic-html5_template
Sitepoint.com a basic-html5_templateDaniel Downs
 
Killing the Angle Bracket
Killing the Angle BracketKilling the Angle Bracket
Killing the Angle Bracket
jnewmanux
 
Web Design Bootcamp - Day1
Web Design Bootcamp - Day1Web Design Bootcamp - Day1
Web Design Bootcamp - Day1Aslam Najeebdeen
 
Session ii(html)
Session ii(html)Session ii(html)
Session ii(html)
Shrijan Tiwari
 
GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1Heather Rock
 
HTML (Basic to Advance)
HTML (Basic to Advance)HTML (Basic to Advance)
HTML (Basic to Advance)
Coder Tech
 

Similar to xhtml_basics (20)

Introduction to whats new in css3
Introduction to whats new in css3Introduction to whats new in css3
Introduction to whats new in css3
 
More On Html 5
More On Html 5More On Html 5
More On Html 5
 
Eye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easilyEye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easily
 
Web technologies: Lesson 2
Web technologies: Lesson 2Web technologies: Lesson 2
Web technologies: Lesson 2
 
Html beginners tutorial
Html beginners tutorialHtml beginners tutorial
Html beginners tutorial
 
Html Workshop
Html WorkshopHtml Workshop
Html Workshop
 
Xml
XmlXml
Xml
 
[In Control 2010] HTML5
[In Control 2010] HTML5[In Control 2010] HTML5
[In Control 2010] HTML5
 
Html beginner
Html beginnerHtml beginner
Html beginner
 
WDIM268 Week 6 (Summer 2010)
WDIM268 Week 6 (Summer 2010)WDIM268 Week 6 (Summer 2010)
WDIM268 Week 6 (Summer 2010)
 
2001: Bridging the Gap between RSS and Java Old School Style
2001: Bridging the Gap between RSS and Java Old School Style2001: Bridging the Gap between RSS and Java Old School Style
2001: Bridging the Gap between RSS and Java Old School Style
 
HTML/CSS Lecture 1
HTML/CSS Lecture 1HTML/CSS Lecture 1
HTML/CSS Lecture 1
 
HTML practical file
HTML practical fileHTML practical file
HTML practical file
 
HTML Foundations, part 1
HTML Foundations, part 1HTML Foundations, part 1
HTML Foundations, part 1
 
Sitepoint.com a basic-html5_template
Sitepoint.com a basic-html5_templateSitepoint.com a basic-html5_template
Sitepoint.com a basic-html5_template
 
Killing the Angle Bracket
Killing the Angle BracketKilling the Angle Bracket
Killing the Angle Bracket
 
Web Design Bootcamp - Day1
Web Design Bootcamp - Day1Web Design Bootcamp - Day1
Web Design Bootcamp - Day1
 
Session ii(html)
Session ii(html)Session ii(html)
Session ii(html)
 
GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1
 
HTML (Basic to Advance)
HTML (Basic to Advance)HTML (Basic to Advance)
HTML (Basic to Advance)
 

More from tutorialsruby

&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />tutorialsruby
 
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>tutorialsruby
 
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>tutorialsruby
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />tutorialsruby
 
Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0tutorialsruby
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269tutorialsruby
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269tutorialsruby
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008tutorialsruby
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008tutorialsruby
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheetstutorialsruby
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheetstutorialsruby
 
Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascripttutorialsruby
 

More from tutorialsruby (20)

&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
 
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
 
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
 
Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0
 
xhtml_basics
xhtml_basicsxhtml_basics
xhtml_basics
 
xhtml-documentation
xhtml-documentationxhtml-documentation
xhtml-documentation
 
xhtml-documentation
xhtml-documentationxhtml-documentation
xhtml-documentation
 
CSS
CSSCSS
CSS
 
CSS
CSSCSS
CSS
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
 
HowTo_CSS
HowTo_CSSHowTo_CSS
HowTo_CSS
 
HowTo_CSS
HowTo_CSSHowTo_CSS
HowTo_CSS
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
 
Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascript
 
eng2u3less38
eng2u3less38eng2u3less38
eng2u3less38
 

Recently uploaded

Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 

Recently uploaded (20)

Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 

xhtml_basics

  • 1. Fast and Easy XHTML - XHTML Tutorial, By Shirley E. Kaiser, M.A., SKDesigns - Website Tips at Websitetips.com December, 2001, Updated March 2006 Copyright © 2001-2006, Shirley E. Kaiser, M.A., SKDesigns. All rights reserved. Wondering how to turn your HTML markup into XHTML? Here are a few quick tips to teach you the very basics, a sample XHTML document, and resources for more information. If you already know HTML, I suspect you can learn how to implement these markup changes within a couple of hours. If you just dig in and give it a try, I think you'll be pleasantly surprised to see that it's easier than you may have thought. Ready to give it a try? Let's go.... The Basics http://websitetips.com/articles/xhtml/basics/ (1 of 6)3/20/2006 11:32:47 AM
  • 2. Fast and Easy XHTML, XHTML Tutorial, HTML, Web Standards, by Shirley ...ML Tutorials, CSS Tutorials and Tips, Website Tips at Websitetips.com 1. All your markup needs to be in lowercase. For example, instead of <P></P> it needs to be <p></p> for XHTML. 2. Every tag must have a corresponding ending tag, such as <p></p> and <li></li>. Some tags don't have a corresponding ending tag, such as <br>, <hr>, and others. Those tags, to be backward compatible will look like this instead: <br /> <hr /> (Below is an XHTML document sample that shows more of these.) 3. Every attribute value must be in double quotes, such as: <img src="image.gif" height="150" width="40" alt="funny face" /> Notice that since the <img> tag doesn't have a corresponding ending tag that it also is closed with the extra space and slash, too. 4. Nesting must be correct (and symmetrical). HTML also requires correct nesting, but it wasn't always as problematic in browsers. XHTML requires it done properly, though. For example, this is incorrect: <p><strong>Text</p></strong> This is correct: <p><strong>Text</strong></p> 5. An ampersand (&) within an attribute value must use its character entity reference. For example, a URL like this: <a href="http://www.foo.com/cgi-bin/ http://websitetips.com/articles/xhtml/basics/ (2 of 6)3/20/2006 11:32:47 AM
  • 3. Fast and Easy XHTML, XHTML Tutorial, HTML, Web Standards, by Shirley ...ML Tutorials, CSS Tutorials and Tips, Website Tips at Websitetips.com class.pl?saturday&night&live">foo</a> must instead be: <a href="http://www.foo.com/cgi-bin/ class.pl?saturday&amp;night&amp;live">foo</a> 6. Your markup must be well-formed. If you've already been writing good markup that validates with W3C, it's no big deal. If not, it's a good time to clean up your markup. A New DTD In addition to the above is a new DTD, too. The sample below is for XHTML 1.0 transitional. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/ xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> The first line, beginning with <?xml version= ..., is the xml prolog, and it's recommended but not required. Note that using the xml prolog will trigger IE6 Quirks Mode, so you might want to leave it out or learn more about it before deciding. The http://websitetips.com/articles/xhtml/basics/ (3 of 6)3/20/2006 11:32:47 AM
  • 4. Fast and Easy XHTML, XHTML Tutorial, HTML, Web Standards, by Shirley ...ML Tutorials, CSS Tutorials and Tips, Website Tips at Websitetips.com xml prolog tells the browser that your document is based upon a DTD using XML, and that it's using a standard character encoding. The second line, beginning with <!DOCTYPE ....>, will look more familiar to you, this time representing XHTML 1.0 transitional. Then, the last line beginning with <html xmlns=" ....> replaces the <html> element, telling the browser the language and the namespace. Below is a sample XHTML document. Note that all the markup is in lowercase, there are quotes around the attribute values, the new endings for the tags that don't have corresponding ending tags, and it is all well formed. A Sample XHTML Document <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Nifty New XHTML document</title> <meta name="description" content="This is the coolest XHTML document on the Internet." /> <link rel="stylesheet" type="text/css" href="stylesheet.css" /> </head> <body> <p>Content here.</p> <p>Content here.</p> http://websitetips.com/articles/xhtml/basics/ (4 of 6)3/20/2006 11:32:47 AM
  • 5. Fast and Easy XHTML, XHTML Tutorial, HTML, Web Standards, by Shirley ...ML Tutorials, CSS Tutorials and Tips, Website Tips at Websitetips.com <ol> <li>List item one</li> <li>List item two</li> </ol> <dl> <dt>Term</dt> <dd>definition</dd> </dl> <img src="image.gif" height="150" width="40" alt="funny face" /> <br/> <table class="data"> <tr><td>Green eggs</td><td>Ham</td></tr> </table> <form method="get" action="foo"> <select name=""> <option value="all">All Products</option> <option value="books">Books</option> </select> <input type="text" name="keyword" size="10" value="" /> <input type="submit" name="Search" value="Go!" /> </form> </body> </html> Resources http://websitetips.com/articles/xhtml/basics/ (5 of 6)3/20/2006 11:32:47 AM
  • 6. Fast and Easy XHTML, XHTML Tutorial, HTML, Web Standards, by Shirley ...ML Tutorials, CSS Tutorials and Tips, Website Tips at Websitetips.com To learn lots more about XHTML, check out WebsiteTips.com's XHTML section for annotated links to W3C recommendations, articles and tips, sites devoted to XHTML, and more. Also highly recommended is Molly Holzschlag's book, XML, HTML, XHTML Magic published by New Riders. This tutorial was originally published December 09, 2001 at Brainstorms and Raves. Copyright © 2001 Shirley E. Kaiser, M.A. All Rights Reserved. Reprint with permission only. Please contact the author for details. Today is March 20, 2006 - PST Copyright © 1996-2006 WebsiteTips.com. All rights reserved. Created and maintained by SKDesigns. http://websitetips.com/articles/xhtml/basics/ Last modified March 20, 2006 - 7:16pm PST http://websitetips.com/articles/xhtml/basics/ (6 of 6)3/20/2006 11:32:47 AM